var fs=require('fs');

function home(response){
    response.writeHead(200,{'Content-Type':'text/html'});
    fs.createReadStream(__dirname+'/index.html','utf8').pipe(response);
}

function review(response){
    response.writeHead(200,{'Content-Type':'text/html'});
    fs.createReadStream(__dirname+'/review.html','utf8').pipe(response);
}

function yx (response){
    response.writeHead(200,{'Content-Type':'application/json'});
    var yx_json={
        "name_1":"yexuan"
    };
    response.end(JSON.stringify(yx_json));

}

module.exports={
    home:home,
    review:review,
    yx:yx
}